//
//  AGLKVertexAttribArrayBuffer.h
//  OpenGLES_Learning
//
//  Created by vandong on 7/29/13.
//  Copyright (c) 2013 Mac Center. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface AGLKVertexAttribArrayBuffer : NSObject
{
    GLsizeiptr      stride;
    GLsizeiptr      bufferSizeBytes;
    GLuint          glName;
}

@property (nonatomic, readonly) GLuint          glName;
@property (nonatomic, readonly) GLsizeiptr      bufferSizeBytes;
@property (nonatomic, readonly) GLsizeiptr      stride;

- (id)initWithAttribStride:(GLsizeiptr)stride numberOfVertices:(GLsizei)count data:(const GLvoid *)dataPtr usage:(GLenum)usage;
- (void)reinitWithAttribStride:(GLsizeiptr)aStride numberOfVertices:(GLsizei)count bytes:(const GLvoid *)dataPtr;

- (void)prepareToDrawWithAttrib:(GLuint)index numberOfCoordinates:(GLint)count attribOffset:(GLsizeiptr)offset shouldEnable:(BOOL)shouldEnable;
- (void)drawArrayWithMode:(GLenum)mode startVertexIndex:(GLint)first numberOfVertices:(GLsizei)count;
@end
